package com.earnings.okhttputils.utils.utils;

/**
 * Created by Administrator on 2017/4/11 0011.
 */

public class TimestampTransform {
    public static String TimeStamp2Date(String timestampString) {
        Long timestamp = Long.parseLong(timestampString) * 1000;
        String date = new java.text.SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(new java.util.Date(timestamp));
        return date;
    }

    public static String getYMD(String timestampString) {
        Long timestamp = Long.parseLong(timestampString) * 1000;
        String date = new java.text.SimpleDateFormat("yyyy/MM/dd").format(new java.util.Date(timestamp));
        return date;
    }
}
